<?php 

try {
	$pdo = new PDO('mysql:host=localhost; dbname=exercise', 'root', 'root');
	$sql = 'select * from user where username=:username and password=:password';
	$stmt = $pdo->prepare($sql);
	$stmt->bindParam(':username', $username, PDO::PARAM_STR);
	$stmt->bindParam(':password', $password, PDO::PARAM_STR);
	$username = 'huangbowenplus';
	$password = 'huangbowenplus';
	$stmt->execute();
	$stmt->debugDumpParams();

} catch (PDOException $e) {
	$e->getMessage();
}


 ?>